home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / pd / netz / ums / ums-beta / developer / doc / ums.doc
Text File  |  1995-07-09  |  82KB  |  2,293 lines

  1. TABLE OF CONTENTS
  2.  
  3. ums.library/--background--
  4. ums.library/--loginguide--
  5. ums.library/--message-format--
  6. ums.library/--attributes--
  7. ums.library/UMSCannotExport
  8. ums.library/UMSDeleteMsg
  9. ums.library/UMSDupAccount
  10. ums.library/UMSErrNum
  11. ums.library/UMSErrTxt
  12. ums.library/UMSErrTxtFromNum
  13. ums.library/UMSExportedMsg
  14. ums.library/UMSFreeConfig
  15. ums.library/UMSFreeMsg
  16. ums.library/UMSLog
  17. ums.library/UMSLogin
  18. ums.library/UMSLogout
  19. ums.library/UMSMatchConfig
  20. ums.library/UMSReadConfig
  21. ums.library/UMSReadMsg
  22. ums.library/UMSRLogin
  23. ums.library/UMSSearch
  24. ums.library/UMSSelect
  25. ums.library/UMSServerControl
  26. ums.library/UMSWriteConfig
  27. ums.library/UMSWriteMsg
  28. ums.library/--background--                         ums.library/--background--
  29.  
  30.    $VER: 11.29 (11-Jun-95)
  31.  
  32.  
  33.    COPYRIGHT
  34.  
  35.          This document is (C) 1992-1995 by Martin Horneffer, Olaf Peters,
  36.        Christoph Viethen, and Stefan Becker.
  37.  
  38.          It may freely be copied and distributed, as long as the text  is
  39.        unchanged and this copyright notice is left intact.
  40.  
  41.    GENERAL
  42.          UMS stands for "Universal Message System".
  43.  
  44.          This means that UMS allows  to  treat  and  read  all  kinds  of
  45.        messages ('e-mail' and 'news') as universally and  efficiently  as
  46.        possible.
  47.  
  48.          The user should not need to care about what  network  a  message
  49.        comes from or goes to/through and what format is used, he  or  she
  50.        should be able to concentrate totally on the messages' contents.
  51.  
  52.          In order to achieve this goal, UMS does two things:
  53.  
  54.          1) define an universal format for messages where messages in all
  55.        formats and from all networks can be stored  in  without  loss  of
  56.        information and nevertheless being randomly interchangeable.
  57.  
  58.          This universal message format is described in this  document  in
  59.        section "--message-format--".
  60.  
  61.          2) implement a central, network-independent  database-mamagement
  62.        that allows to store and read/retrieve messages in the UMS  format
  63.        as efficiently as possible.
  64.  
  65.          The implementation of the  Message  Base  Processor  ('MBP')  is
  66.        based on the server/client- concept. Clients address the server to
  67.        get  or put messages. The server manages the storage and retrieval
  68.        of messages and controls the different client's  access-rights  to
  69.        the  system.  The  common interface between client and server is a
  70.        set of functions described in this document.
  71.  
  72.          Clients are
  73.  
  74.          - simple USERS that read  and  write  messages  (using  programs
  75.            called 'newsreaders'),
  76.          - a special kind of user,  the  'SYSOP',  which  has  additional
  77.            rights and tools to manage the system,
  78.          - IMPORTERS, that get messages form other systems and  put  them
  79.            into the local system after converting them to the UMS format,
  80.            and
  81.          - EXPORTERS, that look for all NEW messages in  the  system  and
  82.            send them to other systems  after  converting  them  into  the
  83.            specific format.
  84.  
  85.          The MBP controls which user may read what message  and,  in  the
  86.        same way, which exporter needs to export or forward what  message.
  87.        It  cares  about whether a message can or cannot be correctly sent
  88.        to its destination.
  89.  
  90.          The  MBP  also  performs  dupe-checking  and  reply-chaining  on
  91.        Message-IDs.
  92.  
  93.    TAGS
  94.          UMS extensively uses AmigaDOS-style tags (see: utility.library).
  95.        In addition to the AmigaDOS standard, UMS uses some bit-masking in
  96.        the types of tags:
  97.  
  98.          - if bit 13 is set (tag & 0x2000), the tag  data  is  a  STRPTR,
  99.            i.e. a pointer to a null-terminated string.
  100.          - if bit 14 is set (tag & 0x4000), the tag is considered a 'var-
  101.            parameter' (e.g. LONG *). I.e. the tag.data entry must contain
  102.            a  pointer  to the real data, which will be set/changed by the
  103.            called function.
  104.          - if both bits 13 and 14 are set ((tag &  0x6000)==0x6000),  the
  105.            tag is a pointer to a string pointer which will be set/changed
  106.            (STRPTR *).
  107.          - if none of these bits is set, the data  in  most  cases  is  a
  108.            simple integer parameter (e.g. LONG or  LONGBITS).  Exceptions
  109.            are possible and explicitly mentioned.
  110.  
  111. ums.library/--loginguide--
  112.  
  113.    PURPOSE
  114.        Guidelines on a uniform login-procedure in UMS-applications
  115.  
  116.    NOTE
  117.          Suggestions concerning this section of the  document  should  be
  118.        directed to Olaf Peters <op@hb2.maus.de>
  119.  
  120.    GENERAL
  121.          Shell- & Workbench-startup
  122.  
  123.          An  application  should  take  into  account  the  command  line
  124.        arguments  (Shell)  respectively   Workbench   tooltypes   'NAME',
  125.        'PASSWORD'  and  'SERVER'. Concerning invokation from a Shell, the
  126.        order of arguments  should  match  above  example,  with  'SERVER'
  127.        declared  a  keyword  (resulting  in  a command template beginning
  128.        "NAME,PASSWORD,SERVER/K[,...]").
  129.  
  130.    SHELL
  131.          Invocation from Shell:
  132.  
  133.          If the application is passed a questionmark as the only argument
  134.        on the command line  (i.e.  'UMSapp  ?'),  it  should  return  the
  135.        template  to  stdout and offer a prompt to have the user enter the
  136.        desired options. The user should be  able  to  request  additional
  137.        help  by  responding  to  the  prompt  with  another questionmark.
  138.        Additional help consists of complete version information (at least
  139.        a  standard version template as specified in "Amiga User Interface
  140.        Styleguide" (pp. 110)) accompanied by short help information.
  141.  
  142.          Technical realisation: DOS.ReadArgs() provides a standard  means
  143.        to parsing the command line  and  behaves  exactly  in  the  above
  144.        described  manner  (it  should therefore be used). Additional help
  145.        text can be passed to ReadArgs()  by  supplying  a  custom  RDArgs
  146.        structure  as  third  argument  which  holds a pointer to the text
  147.        string in RDA_ExtHelp. Refer to "The AmigaDOS Manual", Chapter  5,
  148.        Basic  Input and Output Programming, Standard Command Line Parsing
  149.        (pp. 181 as of the 3rd edition)
  150.  
  151.    GUI
  152.          Applications allowing login via GUI (graphical user interface):
  153.  
  154.          If 'NAME' is not specified at startup time, it must  be  entered
  155.        to the login window. Activate the name object.
  156.  
  157.          It is legal to pass an empty 'PASSWORD' as long  as  a  name  is
  158.        specified. Thus the empty password must attempt a  login!  If  the
  159.        user  passes  the period (".") as 'PASSWORD', she desires to enter
  160.        her password to the login window. It should open with the password
  161.        object activated.
  162.  
  163.          If there is no 'SERVER' specified and the login window  must  be
  164.        opened due to the above guidelines, the server  object  should  be
  165.        filled  with  the  name  of the default server (i.e. the server to
  166.        which the user would be going to log in to if she was not naming a
  167.        different one herself). The default server's name can be read from
  168.        the ENV $UMSSERVER. If the ENV does not exist, the default name is
  169.        "default". :-)
  170.  
  171.          A  failed  GUI  login  should  be answered in a requester. After
  172.        confirmation  the  user  should  be  presented with the unmodified
  173.        login  window again as to correct her wrong inputs. Cancelling the
  174.        requester should result in terminating the application.
  175.  
  176. ums.library/--message-format--                 ums.library/--message-format--
  177.  
  178.    NAME
  179.        UMS Message Format -- the universal format of UMS messages
  180.  
  181.    NOTE
  182.          Suggestions  concerning  this  section of the document should be
  183.        directed to Christoph Viethen <cv@nostlgic.oche.de>.
  184.  
  185.    GENERAL
  186.          A message in the UMS message base is always defined by a list of
  187.        tags.  This  allows  for  easy extension as new tags may always be
  188.        defined later on.
  189.  
  190.          In one UMS message, each tag may occur only once.
  191.  
  192.    TEXT TAGS
  193.          The  first  part  of  this  section  describes the format of the
  194.        currently  defined  TEXT-tags.  Currently  these  tags include all
  195.        information  that is site-independend and needed when transferring
  196.        messages between different systems.
  197.  
  198.          Except when explicitly stated otherwise, these tags are network-
  199.        independent.  Drivers  for  all  networks  can and must understand
  200.        them.
  201.  
  202.          A text-tag specifies a null-terminated string of any length. All
  203.        ASCII-characters  are allowed. Unless something else is documented
  204.        for  a specific tag, the standard Amiga charset (ISO 8859 Latin 1)
  205.        is used for 8-bit characters.
  206.  
  207.          Some of the text-tags are required for every message, others are
  208.        optional.
  209.  
  210.  
  211.      0. UMSCODE_MsgText
  212.  
  213.          This  contains  the main 'text' of a message. Every message must
  214.        have this tag as it is usually the main information transported by
  215.        a message.
  216.  
  217.          Any  information  that does not belong to the original text must
  218.        not  be  put  here.  Even  when  a  gateway  between two different
  219.        networks puts information in the text, an UMS importer should - if
  220.        possible  - extract this information and use or store it somewhere
  221.        else.
  222.  
  223.          The text may be of any size, even empty.
  224.  
  225.          By  using  the global ums.config item "Maxmsgsize" you can set a
  226.        size  limit.  Attempting to _write_ messages larger than this into
  227.        the  message  base will fail. (This limit does not affect the size
  228.        of  messages  already  in  the  message base. If you, say, write a
  229.        message  of  500K  into the MB and then set "Maxmsgsize" to 300000
  230.        (bytes), there shouldn't be any problems when making read accesses
  231.        to this message.)
  232.  
  233.          Since  some  networks  limit messages to a certain size, drivers
  234.        for these networks must be able to cope with this situation.
  235.  
  236.          Lines  are  delimited  by the standard line delimiter (LF in the
  237.        current  UMS implementation), no matter, what network the specific
  238.        messages  originate from and what kind of line delimiters are used
  239.        there.
  240.  
  241.          Lines  may  be  of  any  length, so it's up to the newsreader or
  242.        exporter to wrap lines if needed.
  243.  
  244.  
  245.      1. UMSCODE_FromName
  246.  
  247.          This is the name of the message's author. It's only the name and
  248.        NOT the address. This should be the REALNAME!
  249.  
  250.          If  there is no realname, the username must be used or extracted
  251.        from the author's address.
  252.  
  253.          Every message must have this tag.
  254.  
  255.  
  256.      2. UMSCODE_FromAddress
  257.  
  258.          This  is  the author's net-address. The name needn't redundantly
  259.        be repeated in this field, if it's already in UMSCODE_FromName.
  260.  
  261.          This  tag must be empty or the tag must not be specified, if the
  262.        author  is  located on the local system. In every other case, this
  263.        tag is mandatory.
  264.  
  265.          Whenever possible, the address should be the user's real address
  266.        and  not an encapsulated address or the address of a gateway. Thus
  267.        it may be necessary for importers to convert received addresses to
  268.        another  network's format. The corresponding exporters, of course,
  269.        have  to be able to re-convert these addresses. This makes the use
  270.        of  gateways  transparent to the user - one of UMS' most important
  271.        features.  It  saves  the user from having to know and worry about
  272.        the formats of all the gateways himself.
  273.  
  274.          Since  there  are  different  networks with different formats of
  275.        addresses, it's neccessary to distinguish these different formats.
  276.        This  is  done  by  looking  at  the  "tail"  of  the address. The
  277.        following formats are currently known:
  278.  
  279.  
  280.           Identifier                          : network/format
  281.           ----------------------------------------------------
  282.           "@Fidonet"                          : FidoNet
  283.           ".maus"                             : MausNet
  284.           ".org", ".edu", ".UUCP", ".net",
  285.           ".de", .. [any valid usenet domain] : RFC
  286.           "@BIX"                              : BIX
  287.           "@Portal"                           : Portal
  288.  
  289.  
  290.        Important note:
  291.  
  292.           Under certain circumstances, other identifiers may be used:
  293.  
  294.           1) Small networks: Quite a few of them use adresses which
  295.           look like FidoNet-Adresses, but contain a different "zone
  296.           number". For practical reasons, messages from such networks
  297.           may be imported into the UMS message base using an identifier
  298.           other than "@Fidonet". So you may encounter addresses like e.g.
  299.           "21:100/1.0@Gernet" in the MB.
  300.  
  301.           2) There are special-purpose applications, like e.g. QWK im-/
  302.           exporters(?), which could use other kinds of identifiers not
  303.           contained in the above table.
  304.  
  305.  
  306.          So  programmers of UMS applications should keep the following in
  307.        mind:
  308.  
  309.          Any UMS tool should be programmed in such a way that it does not
  310.        break if it encounters unknown network identifiers and/or formats.
  311.        In such cases, it should inform the user of the problem and behave
  312.        "neutrally", e.g. ignore the problematic message. UMS tools should
  313.        never  rely  on  somewhat  adventurous  "address  format guessing"
  314.        methods.
  315.  
  316.          On  the other hand, if you plan to write a tool that will import
  317.        messages  into  the  MB with address formats different to the ones
  318.        mentioned  in  the  above  table,  you  are  _strongly_ advised to
  319.        contact   authors   of  other  UMS  applications,  especially  the
  320.        developers   of   the   UMS   im-/exporters,  in  order  to  avoid
  321.        incompatibility problems right from the start.
  322.  
  323.  
  324.        Examples:
  325.  
  326.           a) Fidonet          2:2452/107.9@Fidonet
  327.                               2:242/53@Fidonet
  328.  
  329.           b) MausNet          AC2.maus
  330.                               MS.maus
  331.                               MK2.maus
  332.                               M.maus
  333.  
  334.           c) RFC              maho@dfv.rwth-aachen.de
  335.                               marvin@tornado.oche.de
  336.                               in-info@individual.net
  337.                               postmaster@germany.uucp
  338.                               peterk@cbmger.de.so.commodore.com
  339.  
  340.  
  341.          Network-identifiers  are  NOT  case-sensitive. Nevertheless, you
  342.        always  should  preserve  case,  as  it  might  be  needed by some
  343.        networks.
  344.  
  345.  
  346.        Historical note:
  347.  
  348.           Some time ago, a special address format was used in the
  349.           german "Z-Netz", and its identifier was ".zer". That format
  350.           had a number of limitations and disadvantages, so a new
  351.           mail format called "ZConnect" was developed and now should
  352.           be used by all Z-Netz members. This new format no longer
  353.           needs any special address identifiers since it uses real RFC
  354.           addresses.
  355.           So the identifier ".zer" mentioned in the V10 version of
  356.           this documentation shouldn't be treated in a special way
  357.           by programs using ums.library any more.
  358.  
  359.  
  360.        Some examples for splitting addresses for 'Name' and 'Address':
  361.  
  362.  
  363.        RFC:
  364.  
  365.           "Martin Horneffer <maho@umshq.dfv.rwth-aachen.de>"
  366.           -> name: "Martin Horneffer"
  367.              address: "maho@umshq.dfv.rwth-aachen.de"
  368.  
  369.           "horneff@pool.informatik.rwth-aachen.de (Martin Horneffer)"
  370.           -> name: "Martin Horneffer"
  371.              address: "horneff@pool.informatik.rwth-aachen.de"
  372.  
  373.           "horneff@pool.informatik.rwth-aachen.de"
  374.           -> name: "horneff"
  375.              address: "horneff@pool.informatik.rwth-aachen.de"
  376.  
  377.  
  378.        FidoNet:
  379.  
  380.           "Martin Horneffer at 2:242/7.9"
  381.           -> name: "Martin Horneffer"
  382.              address: "2:242/7.9@Fidonet"
  383.  
  384.           "Joerg Gutzke at 2:242/7"
  385.           -> name: "Joerg Gutzke"
  386.              address: "2:242/7@Fidonet"
  387.  
  388.  
  389.      3. UMSCODE_ToName
  390.  
  391.          Name of the person the message is addressed to.
  392.  
  393.          Must  be  specified  in  all  private messages ("e-mail") and is
  394.        optional in public messages ("news").
  395.  
  396.  
  397.      4. UMSCODE_ToAddress
  398.  
  399.          The addressed person's network address.
  400.  
  401.          Needed  in  private  messages if the message has not yet reached
  402.        its  destination. Must not be used when the mail is addressed to a
  403.        user on the local system.
  404.  
  405.          UMSCODE_ToName  and  UMSCODE_ToAddress  have  exactly  the  same
  406.        format as UMSCODE_FromName and UMSCODE_FromAddress.
  407.  
  408.          It  should  always  be  possible to reply to a private or public
  409.        message  by  using it's FromName and FromAddress as the new ToName
  410.        and ToAddress.
  411.  
  412.  
  413.      5. UMSCODE_MsgID
  414.  
  415.          A  unique  message  ID  in  RFC-format.  This  is valid also for
  416.        non-RFC networks like FidoNet or MausNet!
  417.  
  418.          Every  message  must  have  such  an  ID. If there's no ID for a
  419.        message, the message base processor will create a new one for this
  420.        message. Never create message IDs on your own!
  421.  
  422.          Some  example  message  ID's,  just to give you an idea what IDs
  423.        from RFC and non-RFC systems may look like within UMS:
  424.  
  425.  
  426.        2pocc6$qf2@Germany.EU.net
  427.        295@lyssa.owl.de                       (generated by RFC systems)
  428.  
  429.        91102312@p27.f107.n2452.z2.fidonet.org (generated by a Fido "point")
  430.        51515153@f7.n242.z2.fidonet.org        (generated by a  "non-point")
  431.  
  432.        199409281223.a27374@hro.maus.de        (generated in MausNet)
  433.  
  434.  
  435.      6. UMSCODE_CreationDate
  436.  
  437.          (Optional)  date  of  creation,  i.e.  when the message has been
  438.        written  by  the  user.  May  be in any format that is readable by
  439.        humans. AmigaDOS format (dd-mmm-yy hh:mm:ss) preferred.
  440.  
  441.          If not set, then the message base processor will use the current
  442.        date to create a date string in AmigaDOS format.
  443.  
  444.  
  445.      7. UMSCODE_ReceiveDate
  446.  
  447.          Obsolete.  Don't  use  any more! As a replacement there is a tag
  448.        for a site-specific binary date.
  449.  
  450.  
  451.      8. UMSCODE_ReferID
  452.  
  453.          (Optional)  message  ID  of  the  most  recent  message  that is
  454.        referred to by the current message. Same format as 'MsgID'.
  455.  
  456.  
  457.      9. UMSCODE_Group
  458.  
  459.          Name of the message's newsgroup.
  460.  
  461.          Must  be  used  for  public  messages only. Must not be used for
  462.        private  mail. This tag is the only one that distinguishes private
  463.        from public messages.
  464.  
  465.          To  avoid  possible  conflicts,  the name of the network must be
  466.        prepended  for  non-usenet  groupnames.  Usenet  groupnames, which
  467.        already are hierarchically ordered, stay as they are.
  468.  
  469.          E.g. "fidonet.AMIGA", "maus.ac.amiga", "comp.sys.amiga.misc".
  470.  
  471.          Only  one  group  may be used in this field! Use 'Hardlinks' for
  472.        "crosspostings".
  473.  
  474.  
  475.      10. UMSCODE_Subject
  476.  
  477.          The (short) subject of the message. Required.
  478.  
  479.  
  480.      11. UMSCODE_Attributes
  481.  
  482.          (Optional) List of keywords. See ums.library/--attributes--
  483.  
  484.  
  485.      12. UMSCODE_Comments
  486.  
  487.          (Optional)  all  "header-"information,  that belong to a message
  488.        and must be preserved, but don't fit to another text-tag. E.g. all
  489.        unknown RFC-header lines go here.
  490.  
  491.          The  first  line should specify the name of networks the message
  492.        comes from and the name (and perhaps version) of the importer.
  493.  
  494.  
  495.      13. UMSCODE_Organization
  496.  
  497.          (Optional) sender's organization or, in FidoNet, "Origin".
  498.  
  499.  
  500.      14. UMSCODE_Distribution
  501.  
  502.          (Optional)  where/what  the message should be distributed to/by.
  503.        Much like RFC-"Distribution:".
  504.  
  505.          Could  e.g.  be  used to select which UMS-Exporter should export
  506.        the respective message if the ums.config is set accordingly.
  507.  
  508.  
  509.      15. UMSCODE_Folder
  510.  
  511.          (Written  by receiver) The receiver of a private message may use
  512.        this  field  to  store  a  short  label in (not more than about 30
  513.        chars,  not  more  than  one  line). This allows him to categorize
  514.        received  messages. Newsreaders may allow to change that field for
  515.        private  messages  and  then  to use these categories or 'folders'
  516.        like 'groups' in public messages.
  517.  
  518.  
  519.      17. UMSCODE_MausID
  520.  
  521.          This is specific to MausNet.
  522.  
  523.          It  should  thus  be  ignored  by  all programs not specifically
  524.        dealing  with MausNet. It's used to store the internal MausNet-ID.
  525.        It  will  become  superfluous when MausNet software learns to deal
  526.        with real Message-IDs.
  527.  
  528.  
  529.      18. UMSCODE_ReplyGroup
  530.  
  531.          (Optional)  name  of  the  group  public  replies ("follow-ups")
  532.        should go to. Ergo: Same purpose as "Followup-To:" in RFC1036.
  533.  
  534.          If  not empty, newsreaders should copy this to the UMSCODE_Group
  535.        field  of  the  new  message  when  writing  a (public) follow-up.
  536.        Otherwise keep the old UMSCODE_Group field.
  537.  
  538.  
  539.          Same  format  as  for  field  UMSCODE_Group, except that, if the
  540.        author  of the public message thinks that public replies should go
  541.        into  several groups (as a "crossposting"), he may enter a list of
  542.        groups, seperated by commas, into this field.
  543.  
  544.  
  545.          Exception  to  all  of  this:  If this field contains the string
  546.        "poster", this expresses the poster's wish to get a private reply.
  547.        Newsreaders and similar UMS tools should behave accordingly.
  548.  
  549.  
  550.      19./20. UMSCODE_ReplyName/UMSCODE_ReplyAddress
  551.  
  552.          (Optional)  name  and address of the user private replies should
  553.        go to. Same purpose as "Reply-To:" in RFC822.
  554.  
  555.          If  not empty, newsreaders should copy these to the 'ToName' and
  556.        'ToAddress'-fields  of  the  new  message  when  writing a private
  557.        reply. Otherwise 'FromName' and 'FromAddress' should be used.
  558.  
  559.          Same format as for 'ToName' and 'ToAddress'.
  560.  
  561.  
  562.      21./22. UMSCODE_LogicalToName/UMSCODE_LogicalToAddress (V11)
  563.  
  564.          These  fields  are  needed  in UMS systems involved in automatic
  565.        mail distribution/forwarding, mailing lists e.g.
  566.  
  567.          Under  such  conditions,  it  may  be necessary to differenciate
  568.        between   "physical"   and  "logical"  addresses.  While  physical
  569.        addresses  describe  the  systems  messages are indeed transported
  570.        between,  logical  addresses  describe what origin and destination
  571.        the original author intended for his mail.
  572.  
  573.          If   these  fields  are  used,  the  fields  UMSCODE_ToName  and
  574.        UMSCODE_ToAddress contain the respective physical address.
  575.  
  576.          These fields are optional - and usually not needed.
  577.  
  578.  
  579.      23. UMSCODE_FileName (V11)
  580.  
  581.          (Optional) In a first attempt to encourage the support of binary
  582.        messages,  UMS  supports  the notion of "attached files". A binary
  583.        file  may  be attached to each message. If so, this field contains
  584.        the  logical  name  of  the attached file. No assumptions are made
  585.        concerning the style of the logical filename.
  586.  
  587.  
  588.      24. UMSCODE_RFCMsgNum (V11)
  589.  
  590.          Private field for an NNTP daemon service or UUNEWS: emulator.
  591.  
  592.  
  593.      32. UMSCODE_FidoText
  594.  
  595.          This is specific to FidoNet.
  596.  
  597.          It  should  thus  be  ignored  by  all programs not specifically
  598.        dealing  with  FidoNet. It's used by FidoNet drivers to avoid loss
  599.        of informa- tion due to conversions of eol-delimiters or charsets.
  600.  
  601.  
  602.      33. UMSCODE_ErrorText
  603.  
  604.          This  is  private  to  the MBP and a very special utility called
  605.        'bounce-daemon'.  It is used to transfer an error-text for writing
  606.        bounce-mails.  No  programs  except  of the 'bounce-daemon' should
  607.        deal with it.
  608.  
  609.  
  610.      34. UMSCODE_Newsreader
  611.  
  612.          (Optional)  name and version of the tool the message was created
  613.        with.  No specific format, but should be as small as possible. Not
  614.        more than one line.
  615.  
  616.  
  617.      35. UMSCODE_RfcAttr
  618.  
  619.          Private  field for RFC exporters. The user can supply additional
  620.        information or hints to the exporter.
  621.  
  622.  
  623.      36. UMSCODE_FtnAttr
  624.  
  625.          Private  field for FTN exporters. The user can supply additional
  626.        information or hints to the exporter.
  627.  
  628.  
  629.      37. UMSCODE_ZerAttr
  630.  
  631.          Private   field  for  Z-Netz  exporters.  The  user  can  supply
  632.        additional information or hints to the exporter.
  633.  
  634.  
  635.      38. UMSCODE_MausAttr
  636.  
  637.          Private field for Maus exporters. The user can supply additional
  638.        information or hints to the exporter.
  639.  
  640.  
  641.      127. UMSCODE_TempFileName (V11)
  642.  
  643.          (Optional) This tag is related to UMSCODE_FileName. If a file is
  644.        attached to the message, this field contains the "temporary"  name
  645.        of  the  attached  file.  It  has  only a local meaning and may be
  646.        different when reading and writing.
  647.  
  648.          When writing the message, the client must supply the  file  with
  649.        this temporary filename and the MBP must be able to read it.
  650.  
  651.          When reading the message, the MBP supplies the name  to  a  file
  652.        the client may read.
  653.  
  654.          The contents of this field could be eqaul  to  UMSCODE_FileName,
  655.        but don't need to. Client as well as MBP have to use suitable path
  656.        in the filesystem, and specify the full pathname.
  657.  
  658. ums.library/--attributes--                         ums.library/--attributes--
  659.  
  660.    NOTE
  661.          Suggestions concerning this section of the document should be
  662.        directed to Stefan Becker <stefanb@yello.ping.de>.
  663.  
  664.    BUGS
  665.          This section is still in German. Should be English.
  666.  
  667.                                                               24-Sep-1994
  668.  
  669.                Das Format des UMS Feldes "Attributes"
  670.  
  671.          Das UMS Feld "Attributes" enthält zusätzliche  Informationen  zu
  672.        einer Nachricht. Diese Informationen  können  von  den  Importern,
  673.        aber  auch  von den Benutzern mit Hilfe der Message Reader erzeugt
  674.        werden. Ein Importer darf allerdings keine netzspezifischen  Daten
  675.        aus  der  Nachricht für den Exporter des gleichen Netzes in diesem
  676.        Feld ablegen. Dafür ist das Feld "Comments" vorgesehen.
  677.  
  678.          Dieser Text soll  das  Format  dieses  Feldes  vereinheitlichen,
  679.        damit das Feld von allen Programmen gleich ausgewertet  wird.  Das
  680.        Feld  besitzt  das  gleiche Format wie eine Kommandozeile, d.h. es
  681.        läßt sich mit Hilfe der Funktion dos.library/ReadArgs() auswerten.
  682.        Es sind folgende Argumenttypen zugelassen:
  683.  
  684.            /K   - Zeichenkette mit Schlüsselwort
  685.            /K/N - Zahl mit Schlüsselwort
  686.            /S   - Schalter mit Schlüsselwort
  687.  
  688.          Importer   können   private    Schlüsselworte    benutzen,    um
  689.        Informationen über den Status einer Nachricht an den Exporter  des
  690.        gleichen  Netzes  weiterzureichen.  Die  privaten  Schlüsselwörter
  691.        dürfen nicht mit den  öffentlichen  Schlüsselwörtern  kollidieren.
  692.        Damit  ein  Exporter für ihn unbekannte Schlüsselwörter ignorieren
  693.        kann,   hängt    er    ",IGNORE/M"    an    das    Template    für
  694.        dos.library/ReadArgs()  an.  Momentan  werden folgende öffentliche
  695.        Schlüsselworter unterstützt:
  696.  
  697.        ALIAS/K (nur lokal erzeugte Nachrichten)
  698.  
  699.            Die Zeichenkette gibt an, welchen Alias der Benutzer für diese
  700.          Nachricht benutzen möchte. Ein Exporter  _MUSS_  überprüfen,  ob
  701.          dieser  Alias  auch  zu  dem  Benutzer gehört, der die Nachricht
  702.          geschrieben hat!
  703.  
  704.        RECEIPT/S
  705.  
  706.            Dieses Attribut zeigt an, daß diese Nachricht eine Antwort auf
  707.          einen Receipt-Request ist.
  708.  
  709.        RECEIPT-REQUEST/K <addr>
  710.  
  711.            Für diese Nachricht liegt ein  Receipt-Request  des  Absenders
  712.          vor. Falls die Nachricht beim System des  Empfängers  angekommen
  713.          ist,  dann  sollte  der Importer eine Benachrichtigung an <addr>
  714.          zurückschicken.
  715.  
  716.        SECURE/S
  717.  
  718.            Wenn dieses Attribut gesetzt ist, dann soll die Nachricht  bei
  719.          der Übertragung besonders geschützt werden. Der Exporter  sollte
  720.          eine  gesicherte  Übertragungsstrecke  wählen. Falls diese nicht
  721.          zur   Verfügung   steht,   dann   sollte   der   Nachrichtentext
  722.          verschlüsselt  werden,  z.B. durch PGP mit den Empfängeradressen
  723.          als Parameter.
  724.  
  725.        URGENT/S
  726.  
  727.            Mit diesem  Attribut  werden  "eilige"  Nachrichten  markiert.
  728.          Exporter sollten, falls  möglich,  diese  Nachrichten  gesondert
  729.          behandeln.
  730.  
  731. ums.library/UMSCannotExport                       ums.library/UMSCannotExport
  732.  
  733.    NAME
  734.        UMSCannotExport -- Mark a message as not being exportable.
  735.  
  736.    SYNOPSIS
  737.        UMSCannotExport( login, msgNum, error )
  738.                          D2      D3     D4
  739.  
  740.        VOID UMSCannotExport( UMSAccount, LONG, STRPTR );
  741.  
  742.    FUNCTION
  743.          Tell the MBP that you cannot export this  message,  due  to  any
  744.        reason. The MBP will then look if other exporters still  could  be
  745.        able to export the message or do some error processing otherwise.
  746.  
  747.          It may use the supplied error-string therein. This  error-string
  748.        should be a  short  description  why  the  message  could  not  be
  749.        exported. By convention it should not be longer than 80 bytes.
  750.  
  751.    INPUTS
  752.        login  - Handle as returned by UMSLogin() or UMSRLogin()
  753.        msgNum - Number of the message.
  754.        error  - Short string (<80 chars).
  755.  
  756.    NOTES
  757.          This function may only be called by exporters.
  758.  
  759.          The MBP currently does not write a bounce mail to the author  of
  760.        the mail, but sets a  special  global  bit  instead,  which  would
  761.        allows the 'bouncer' tool to automatically write bounce mails.
  762.  
  763.    SEE ALSO
  764.        UMSExportedMsg()
  765.  
  766. ums.library/UMSDeleteMsg                             ums.library/UMSDeleteMsg
  767.  
  768.    NAME
  769.        UMSDeleteMsg -- Delete a message.
  770.  
  771.    SYNOPSIS
  772.        success = UMSDeleteMsg( login, msgNum )
  773.          D0                     D2      D3
  774.  
  775.        BOOL UMSDeleteMsg( UMSAccount, LONG);
  776.  
  777.    FUNCTION
  778.          This functions deletes a message, specified by number, from  the
  779.        UMS MB.
  780.  
  781.          It does not necessarily free space on the hd, but it removes the
  782.        message logically from the MB so that no other user can access  it
  783.        anymore and it won't affect the dupe-check for new messages.
  784.  
  785.          The MBP may need reorganization to physically  remove  logically
  786.        deleted messages.
  787.  
  788.    INPUTS
  789.        login   -  Handle as returned by UMSLogin() or UMSRLogin()
  790.        msgNum  -  Number  of  the  message to be deleted.  As returned by
  791.                   UMSSearch() or WriteUMSMsg().
  792.  
  793.    RESULT
  794.        success  -  Inidcates  whether the message was actually deleted or
  795.                    not.   It  will  be  not  deleted  if  you  don't have
  796.                    write-access  to  this  message or the message doesn't
  797.                    exist.
  798.  
  799.    NOTES
  800.          The number of a message is valid only as long as you are  logged
  801.        in. After UMSLogout() messages numbers may change!
  802.  
  803.          So you always have to use the  real  Message-ID  to  remember  a
  804.        message persistently.
  805.  
  806. ums.library/UMSDupAccount                           ums.library/UMSDupAccount
  807.  
  808.    NAME
  809.        UMSDupAccount -- share a login handle between processes
  810.  
  811.    SYNOPSIS
  812.        login = UMSDupAccount(login)
  813.        D0                      D2
  814.  
  815.        UMSAccount UMSDupAccount(UMSAccount);
  816.  
  817.    FUNCTION
  818.          UMSDupAccount() allows to  share  login  handles  to  be  shared
  819.        between different processes.
  820.  
  821.          A login handle as returned by UMSRlogin() may only  be  used  in
  822.        the same process that obtained the login. If it  wishes  to  share
  823.        this  login  with  other processes, the handle has to be 'dupped':
  824.        the login handle is passed to the new process,  which  may  _only_
  825.        use  this  login with UMSDupAccount(). If successfull, a new login
  826.        handle is returned, which (only!) can be used by the new process.
  827.  
  828.          This procedure is required to manage process-specific  resources
  829.        a login handle may depend on. It does _not_ create a new login  on
  830.        the  server.  Most likely, the server will not be involved in this
  831.        procedure at all, it's all done on the client side.  Each  process
  832.        must  UMSLogout()  all  login  handles  it  obtained  either  from
  833.        UMSRLogin() or from UMSDupAccount(). The  server  only  notices  a
  834.        logout,  when  all  login handles concerning that login are closed
  835.        with UMSLogout(). Order of login and  logout,  however,  does  not
  836.        matter.  E.g.  the  first  process  may UMSLogout() and terminate,
  837.        while the new process ist still running and using a  dupped  login
  838.        handle.  Obviously  the  login handle has to be active at the time
  839.        UMSDupAccount() is invoked, but  it  may  be  closed  as  soon  as
  840.        UMSDupAccount() has returned.
  841.  
  842.    INPUTS
  843.        login - Handle as returned by UMSLogin() or UMSRLogin()
  844.  
  845.    RESULT
  846.        login - Handle number if successful or Zero on failure
  847.  
  848.    SEE ALSO
  849.        UMSLogin(), UMSRLogin(), UMSLogout()
  850.  
  851. ums.library/UMSErrNum                                   ums.library/UMSErrNum
  852.  
  853.    NAME
  854.        UMSErrNum -- Return the number of the last error
  855.  
  856.    SYNOPSIS
  857.        error = UMSErrNum(login)
  858.        D0                D2
  859.  
  860.        UMSError UMSErrNum(UMSAccount);
  861.  
  862.    FUNCTION
  863.          UMS functions usually return zero to  indicate  an  error.  When
  864.        this happens, this routine may be called to get  a  more  specific
  865.        error  code.  By  some  means,  this routine corresponds to an UMS
  866.        login as dos.library/IoErr() does to a DOS-process.
  867.  
  868.          Possible UMS errors are:
  869.  
  870.        0:
  871.  
  872.            No error at all, the last UMS function call was successful.
  873.  
  874.        100-199:
  875.  
  876.            A slight error. The last functions call  was  not  successful,
  877.          but may succeed if some slight  changes  will  be  made  to  its
  878.          parameters.
  879.  
  880.        200-299:
  881.  
  882.            A real error. The last function call was not successful at all
  883.          and should not be retried.
  884.  
  885.        >300:
  886.  
  887.            A severe error concerning the whole system,  e.g.  the  server
  888.          has terminated. A program receiving such an error is recommended
  889.          to UMSLogout() and terminate as soon as possible.
  890.  
  891.    INPUTS
  892.        login - Handle as returned by UMSLogin() or UMSRLogin()
  893.  
  894.    RESULT
  895.        error - Error number
  896.  
  897.    SEE ALSO
  898.        UMSErrTxt()
  899.  
  900. ums.library/UMSErrTxt                                   ums.library/UMSErrTxt
  901.  
  902.    NAME
  903.        UMSErrTxt -- Return a string describing the last error
  904.  
  905.    SYNOPSIS
  906.        text = UMSErrTxt(login)
  907.        D0               D2
  908.  
  909.        STRPTR UMSErrTxt(UMSAccount);
  910.  
  911.    FUNCTION
  912.          When an UMS function fails and/or UMSErrNum() returns a  nonzero
  913.        value, you  should  use  this  routine  to  get  a  brief  English
  914.        description of the last error.
  915.  
  916.          Interactive programs should  display  this  text  to  the  user.
  917.        Non-interactive programs should use this text in their logfile.
  918.  
  919.    INPUTS
  920.        login - Handle as returned by UMSLogin() or UMSRLogin()
  921.  
  922.    RESULT
  923.        text - Pointer to a constant string
  924.  
  925.    NOTES
  926.          This is similiar to dos.library/Fault(), but it doesn't copy any
  927.        string, it just returns a pointer.
  928.  
  929.          You may NEVER change the string returned by UMSErrTxt()!
  930.  
  931.    SEE ALSO
  932.        UMSErrNum(), UMSErrTxtFromNum()
  933.  
  934. ums.library/UMSErrTxtFromNum                     ums.library/UMSErrTxtFromNum
  935.  
  936.    NAME
  937.        UMSErrTxtFromNum -- Return a string describing the last error
  938.  
  939.    SYNOPSIS
  940.        text = UMSErrTxtFromNum(error)
  941.        D0                      D2
  942.  
  943.        STRPTR UMSErrTxtFromNum(UMSError);
  944.  
  945.    FUNCTION
  946.          When an UMS function not related to  an  UMSAccount  returns  an
  947.        nonzero value, you should use this routine to get a brief  English
  948.        description of the last error.
  949.  
  950.          Interactive programs should  display  this  text  to  the  user.
  951.        Non-interactive programs should use this text in their logfile.
  952.  
  953.    INPUTS
  954.        error - UMS error code
  955.  
  956.    RESULT
  957.        text - Pointer to a constant string
  958.  
  959.    NOTES
  960.          This is similiar to dos.library/Fault(), but it doesn't copy any
  961.        string, it just returns a pointer.
  962.  
  963.          You may NEVER change the string returned by UMSErrTxtFromNum()!
  964.  
  965.    SEE ALSO
  966.        UMSErrTxt()
  967.  
  968. ums.library/UMSExportedMsg                         ums.library/UMSExportedMsg
  969.  
  970.    NAME
  971.        UMSExportedMsg -- Mark a message as being successfully exported.
  972.  
  973.    SYNOPSIS
  974.        UMSExportedMsg( login, msgNum )
  975.                         D2      D3
  976.  
  977.        VOID UMSExportedMsg( UMSAccount, LONG );
  978.  
  979.    FUNCTION
  980.          Tells the MBP that a message has been successfully exported. The
  981.        MBP uses this information to prevent other exporters from  wrongly
  982.        exporting this message a second time or writing a bounce message.
  983.  
  984.          Every exporter that exports a message from the local UMS  system
  985.        to any other system or network MUST call  either  UMSExportedMsg()
  986.        or  UMSCannotExport()  for  each message it has processed. This is
  987.        valid for private messages as well as for public messages  (news).
  988.        The MBP will decide what has to be done in any of these cases.
  989.  
  990.    INPUTS
  991.        msgNum - Number of the exported message.
  992.  
  993.    NOTES
  994.          This function may only be called by exporters.
  995.  
  996.    SEE ALSO
  997.        UMSCannotExport()
  998.  
  999. ums.library/UMSFreeConfig                           ums.library/UMSFreeConfig
  1000.  
  1001.    NAME
  1002.  
  1003.        UMSFreeConfig - Free a string returned by UMSReadConfig()
  1004.  
  1005.    SYNOPSIS
  1006.  
  1007.        UMSFreeConfig( login, string)
  1008.                        D2      D3
  1009.  
  1010.        void UMSFreeConfig( UMSAccount, STRPTR );
  1011.  
  1012.    FUNCTION
  1013.          Frees  the  buffer  allocated  for  a  string  and  returned  by
  1014.        UMSReadConfig(). After 'UMSFreeConfig(string)', 'string'  will  no
  1015.        longer be valid.
  1016.  
  1017.    INPUTS
  1018.        login  - Handle as returned by UMSLogin() or UMSRLogin()
  1019.        string - string to be freed as returned by UMSReadConfig()
  1020.  
  1021.    SEE ALSO
  1022.        UMSReadConfig()
  1023.  
  1024. ums.library/UMSFreeMsg                                 ums.library/UMSFreeMsg
  1025.  
  1026.    NAME
  1027.        UMSFreeMsg -- Free buffers associated with a certain message.
  1028.  
  1029.    SYNOPSIS
  1030.        UMSFreeMsg( login, msgNum )
  1031.                     D2      D3
  1032.  
  1033.        UMSFreeMsg( UMSAccount, LONG );
  1034.  
  1035.    FUNCTION
  1036.          Frees  all  the  buffers  associated  with  a  certain  message.
  1037.        ReadUMSMsg() allocates the buffers, this function frees them.
  1038.  
  1039.    INPUTS
  1040.        msgNum - number of the message previously read with ReadUMSMsg().
  1041.  
  1042.    NOTES
  1043.          With UMSFreeMsg() all STRPTRs obtained  with  ReadUMSMsg()  that
  1044.        are concerned with this certain message become  invalid.  You  can
  1045.        have  multiple  ReadUMSMsg()  on  the  same  message  but only one
  1046.        UMSFreeMsg().
  1047.  
  1048.    SEE ALSO
  1049.        UMSReadMsg()
  1050.  
  1051. ums.library/UMSLog                                         ums.library/UMSLog
  1052.  
  1053.    NAME
  1054.        UMSLog -- Write an entry to the global UMS logfile
  1055.  
  1056.    SYNOPSIS
  1057.        UMSLog(login, level, format, ...)
  1058.               D2     D4     D5      D6
  1059.  
  1060.        void UMSLog(UMSAccount, LONG, STRPTR, ... );
  1061.  
  1062.        UMSVLog(login, level, format, args)
  1063.                 D2    D4      D5     D6
  1064.  
  1065.        void UMSVLog(UMSAccount, LONG, STRPTR, APTR);
  1066.  
  1067.    FUNCTION
  1068.          Write a short message to the UMS logfile,  doing  printf()-style
  1069.        formatting on supplied parameters.
  1070.  
  1071.          Rather than creating its own logfile, an application should  use
  1072.        this function to report its actions and/or errors. This  makes  it
  1073.        easier for the user to get an overview on what is happening in his
  1074.        system - he only has to look in ONE logfile.
  1075.  
  1076.          UMSLog() uses a 'level' parameter to decide  whether  a  message
  1077.        should actually be written to the logfile or be ignored. The lower
  1078.        this  number,  the  more  important  is  the message. Choose it as
  1079.        follows:
  1080.  
  1081.        1-4:
  1082.  
  1083.            An ERROR. 1 = fatal error, 4 = recoverable error.
  1084.  
  1085.        5-7:
  1086.  
  1087.            General information or report.
  1088.  
  1089.        8-9:
  1090.  
  1091.            Information that is not useful for normal operation, but  used
  1092.          for debugging purposes.
  1093.  
  1094.          Of course messages with high level  values  should  appear  more
  1095.        frequently than those with low level values.
  1096.  
  1097.    INPUTS
  1098.        login  - Handle as returned by UMSLogin() or UMSRLogin()
  1099.        level  - Number between 1 and 9
  1100.        format - printf()-style format string. See exec.library/RawDoFmt()
  1101.                 for more information on formatting.
  1102.        args   - Arguments for the format string
  1103.  
  1104.    SEE ALSO
  1105.        exec.library/RawDoFmt()
  1106.  
  1107. ums.library/UMSLogin                                     ums.library/UMSLogin
  1108.  
  1109.    NAME
  1110.        UMSLogin -- Obtain a login for access to the default message base
  1111.  
  1112.    SYNOPSIS
  1113.        login = UMSLogin(user, passwd)
  1114.        D0               D2    D3
  1115.  
  1116.        UMSAccount UMSLogin(STRPTR, STRPTR);
  1117.  
  1118.    FUNCTION
  1119.          This function does the  same  as  UMSRLogin(),  but  you  cannot
  1120.        specify the message base. The default message base  will  be  used
  1121.        instead.
  1122.  
  1123.    INPUTS
  1124.        user   - Name or 'alias' of an user
  1125.        passwd - The password of the user. A pointer to the null-string is
  1126.                 allowed, NULL itself isn't.
  1127.  
  1128.    RESULT
  1129.        login  - Handle number if successful or Zero on failure
  1130.  
  1131.    EXAMPLE
  1132.        UMSAccount login = UMSLogin("SysOp", "secret");
  1133.  
  1134.    NOTE
  1135.          Never forget to call UMSLogout()!
  1136.  
  1137.          New programs should let the user specify the server to  use  and
  1138.        thus use UMSRLogin() instead.
  1139.  
  1140.    SEE ALSO
  1141.        UMSLogout(), UMSRLogin()
  1142.  
  1143. ums.library/UMSLogout                                   ums.library/UMSLogout
  1144.  
  1145.    NAME
  1146.        UMSLogout -- Close a login and free its resources
  1147.  
  1148.    SYNOPSIS
  1149.        UMSLogout(login)
  1150.                  D2
  1151.  
  1152.        void UMSLogout(UMSAccount);
  1153.  
  1154.    FUNCTION
  1155.          Close a login obtained with UMSRLogin()  and  free  all  related
  1156.        resources.
  1157.  
  1158.    INPUTS
  1159.        login - Handle as returned by UMSLogin() or UMSRLogin()
  1160.  
  1161.    SEE ALSO
  1162.        UMSLogin(), UMSRLogin()
  1163.  
  1164. ums.library/UMSMatchConfig                         ums.library/UMSMatchConfig
  1165.  
  1166.    NAME
  1167.        UMSMatchConfig -- Match a string against a config string.
  1168.  
  1169.    SYNOPSIS
  1170.        match = UMSMatchConfig( login, tags )
  1171.          D0                     D2     D3
  1172.  
  1173.        BOOL UMSMatchConfig( UMSAccount, struct TagItem * );
  1174.  
  1175.        match = UMSMatchConfigTags( login, tag1, ... )
  1176.  
  1177.        BOOL UMSMatchConfigTags( UMSAccount, ULONG, ... );
  1178.  
  1179.  
  1180.    FUNCTION
  1181.          UMS has its unique mechanism for pattern-matching, which is used
  1182.        by the MBP for determining different access-rights.
  1183.  
  1184.          UMSMatchConfig() offers direct access to  this  pattern-matching
  1185.        mechanism, including positive and  negative  config  variables.  A
  1186.        taglist  is  used to specify the string to be matched as well as a
  1187.        UMS configuriation string serving as a pattern.
  1188.  
  1189.    INPUTS
  1190.          The functions takes two mandatory tags:
  1191.  
  1192.        MatchString (STRPTR)
  1193.  
  1194.            specifies the string to be matched.
  1195.  
  1196.        MatchVarname (STRPTR)
  1197.  
  1198.            specifies the name of the UMS config string.
  1199.  
  1200.          And there are some optional tags:
  1201.  
  1202.        MatchGlobalOnly (none)
  1203.  
  1204.            only use a global config string.
  1205.  
  1206.        MatchUser (STRPTR)
  1207.  
  1208.            use a config string local to another user. The name (or alias)
  1209.          of that user must be given.
  1210.  
  1211.        MatchDefault (LONG)
  1212.  
  1213.            a value that will be returned, if the specified config  string
  1214.          cannot be found, or any other type of error occurs.
  1215.  
  1216.    RESULT
  1217.        match - the result of the pattern matching. The value of tag
  1218.                MatchDefault or zero if an error occured.
  1219.  
  1220.    SEE ALSO
  1221.        UMSReadConfig()
  1222.  
  1223. ums.library/UMSReadConfig                           ums.library/UMSReadConfig
  1224.  
  1225.    NAME
  1226.        UMSReadConfig -- Read an element from UMS' configuration.
  1227.  
  1228.    SYNOPSIS
  1229.        string = UMSReadConfig( login, tags )
  1230.          D0                     D2     D3
  1231.  
  1232.        STRPTR UMSReadConfig( UMSAccount, struct TagItem * );
  1233.  
  1234.        string = UMSReadConfigTags( login, tag1, ... )
  1235.  
  1236.        STRPTR UMSReadConfigTags( UMSAccount, ULONG, ... );
  1237.  
  1238.  
  1239.    FUNCTION
  1240.          Read an object from UMS' configuration.
  1241.  
  1242.          Whenever possible, applications should use the UMS configuration
  1243.        (as stored in the  file  'ums.config'  in  the  directory  of  the
  1244.        message-base)  and  the  supplied  functions  UMSReadConfig()  and
  1245.        UMSWriteConfig() instead of own special config-files.
  1246.  
  1247.          A 'config-string' is a null-terminated string identified  by  an
  1248.        unique  name.  Similar   to   shell-   and   environment-variables
  1249.        config-strings  can  be global (same for all users) or local (only
  1250.        visible to a certain user).
  1251.  
  1252.          Other  config-objects  are  'users'  (with  aliases  and   local
  1253.        strings), 'akas' and 'netgroups'.
  1254.  
  1255.          In order not to mix up config-strings of different applications,
  1256.        their names should have the  id  of  the  application  and  a  dot
  1257.        prepended.  E.g.  "fido.outbound", "fido.inbound", "uucp.uuspool",
  1258.        "IntuiNews.QuoteChars.foo.bar", "ConfUMS.ForceDelete" etc.
  1259.  
  1260.          Names without a dot (".") are considered private strings of  the
  1261.        MBP, e.g. "READACCESS", "WRITEACCESS".
  1262.  
  1263.          Names for config elements are case-insensitive.
  1264.  
  1265.          This function buffers the returned string until it is freed with
  1266.        UMSFreeConfig() or (UMSLogout()).
  1267.  
  1268.    INPUTS
  1269.          The following tags are allowed:
  1270.  
  1271.        CfgGlobalOnly (none)
  1272.  
  1273.            read just global config-elements, ignore local ones.
  1274.  
  1275.        CfgUser (STRPTR)
  1276.  
  1277.            read config elements local to another user. You  must  specify
  1278.          the name of the other user here. This contradicts  CfgGlobalOnly
  1279.          (see above)!
  1280.  
  1281.        CfgLockVar (LONG, V11)
  1282.  
  1283.            using this tag you may preserve the config string  from  being
  1284.          modified by another login, i.e. another  UMS  program.  Set  the
  1285.          tag's data to 1 if you want to do so, otherwise use 0 (or do not
  1286.          use this tag) to not lock the variable. Be careful to unlock the
  1287.          variable  if you do not need it anymore using UMSWriteConfig()'s
  1288.          tags CfgUnlockVar! This tag is useful only in  conjunction  with
  1289.          CfgName (see below).
  1290.  
  1291.        CfgQuoted (LONG, V11)
  1292.  
  1293.            read the variable in quoted format, as used  in  "ums.config".
  1294.          This enables you to mix the variable's data with macros. Set the
  1295.          tag's  data to 1 if you want to use the quoted format, otherwise
  1296.          set it to 0 (or do not use this tag).
  1297.  
  1298.  
  1299.          The following tags are mutually exclusive. Use  exactly  one  of
  1300.        them.
  1301.  
  1302.          The CfgNext-tags allow you to scan all the existing elements  of
  1303.        one type and do all work in the same manner: On  first  invocation
  1304.        you  set  the  tag's  data to NULL and get the first element. With
  1305.        every further call, you set it to what has been  returned  on  the
  1306.        previous call. When NULL is returned, you're done.
  1307.  
  1308.        CfgName (STRPTR)
  1309.  
  1310.            read a config-string with given name.
  1311.  
  1312.        CfgUserName (STRPTR)
  1313.  
  1314.            get the 'realname' for a user with a given alias.
  1315.  
  1316.        CfgNextVar (STRPTR)
  1317.  
  1318.            get the name of the next config variable.  This  tag  must  be
  1319.          combined with tag CfgGlobalOnly or tag CfgUser (see above).
  1320.  
  1321.        CfgNextAlias (STRPTR, V11)
  1322.  
  1323.            get the next alias. This tags may  be  combined  with  CfgUser
  1324.          (see above)
  1325.  
  1326.        CfgNextUser (STRPTR, V11)
  1327.  
  1328.            get the 'realname' of the next user.
  1329.  
  1330.        CfgNextExporter (STRPTR, V11)
  1331.  
  1332.            get the name of the next exporter.
  1333.  
  1334.        CfgNextGroup (STRPTR)
  1335.  
  1336.            get the name of the next netgroup. Any  number  of  groupnames
  1337.          may be configured as identical 'netgroups'. Use this tag to scan
  1338.          all netgroups, to scan their members use CfgNextGroupMember (see
  1339.          below).
  1340.  
  1341.        CfgNextGroupMember (STRPTR, V11)
  1342.  
  1343.            get the name of the next member of a specific netgroup.  Using
  1344.          this tag repeatedly you can cycle trough all groups belonging to
  1345.          the  same  netgroup.  Members  of  netgroups  are organized in a
  1346.          circular structure, so  you'll  have  to  compare  the  original
  1347.          string  with every result to determine whether you're done. NULL
  1348.          is returned only if the given string doesn't  indicate  a  valid
  1349.          netgroup-member.
  1350.  
  1351.    RESULT
  1352.        string - a pointer to the desired config element or NULL.
  1353.  
  1354.    SEE ALSO
  1355.        UMSFreeConfig(), UMSWriteConfig()
  1356.  
  1357. ums.library/UMSReadMsg                                 ums.library/UMSReadMsg
  1358.  
  1359.    NAME
  1360.        UMSReadMsg -- Read (parts of) a message.
  1361.  
  1362.    SYNOPSIS
  1363.        success = UMSReadMsg( login, tags )
  1364.          D0                   D2     D3
  1365.  
  1366.        BOOL UMSReadMsg( UMSAccount, struct TagItem * );
  1367.  
  1368.        success = UMSReadMsgTags( login, tag1, ... )
  1369.  
  1370.        BOOL UMSReadMsgTags( UMSAccount, ULONG, ... );
  1371.  
  1372.    FUNCTION
  1373.          Read a message or any parts of it.
  1374.  
  1375.    INPUTS
  1376.          The following tags are allowed:
  1377.  
  1378.        RMsgNum (LONG)
  1379.  
  1380.            specify which msg to read. This tag MUST be used!
  1381.  
  1382.        RHeaderLength (LONG*)
  1383.  
  1384.            you have to pass a pointer to a LONG here. This LONG  will  be
  1385.          set to the length of  the  message-header  in  bytes.  I.e.  the
  1386.          length  of  all text-fields considered to belong to the 'header'
  1387.          of a message.
  1388.  
  1389.        RTextLength (LONG*)
  1390.  
  1391.            like RHeaderLength, but the length of the message-text.  These
  1392.          are all other fields.
  1393.  
  1394.        RMsgDate (LONG*)
  1395.  
  1396.            the date the message has  been  written  to  the  message-base
  1397.          (also referred to as the  'receive-date').  In  AmigaDOS  Format
  1398.          (seconds since 1.1.1978).
  1399.  
  1400.        RChainUp,
  1401.        RChainDn,
  1402.        RChainLt,
  1403.        RChainRt (LONG*)
  1404.  
  1405.            reply-chaining. Since a message can only refer  to  one  other
  1406.          (older)  message,  but  have  multiple  other  (newer)  messages
  1407.          referring to it, a tree is built out of this 'comment-chaining'.
  1408.          ChainUp points to the referred message. ChainDn points to one of
  1409.          the  messages  that  comment  on  the  current  one. ChainLt and
  1410.          ChainRt point to other messages which share the same ChainUp.
  1411.  
  1412.            The LONG you supply a pointer to in the tag's data will either
  1413.          be set to zero (when there is no such chain) or to the number of
  1414.          a message.
  1415.  
  1416.        RGlobalFlags (LONGBITS*)
  1417.  
  1418.            global flags for this message. In the  MB  every  message  has
  1419.          exactly one set of global flags. See <ums.h> for the meaning  of
  1420.          these flags.
  1421.  
  1422.        RUserFlags (LONGBITS*)
  1423.  
  1424.            user-flags for this message. Every user of the MB has one  set
  1425.          of user-flags for each message. See <ums.h>  for  the  fixed  or
  1426.          suggested meanings of these flags.
  1427.  
  1428.        RLoginFlags (LONGBITS*)
  1429.  
  1430.            login-flags for this message. Every login has a private set of
  1431.          flags for each message. In contrast  to  global  or  user-flags,
  1432.          login-flags  are  NOT  saved and vanish on UMSLogout(). They are
  1433.          set to zero on UMSLogin().
  1434.  
  1435.        RHardLink,
  1436.        RSoftLink (LONG*)
  1437.  
  1438.            you supply a pointer to a LONG that will be set to the message
  1439.          number of the next hard- or softlink in the circular linked list
  1440.          of messages. The LONG will be set to zero, if there are no links
  1441.          of the respective type to this message. Note that  message-links
  1442.          can  either  be  hard  or soft, but not both a the same time! So
  1443.          only one of HardLink or SoftLink can be non-zero.
  1444.  
  1445.        RDateStyle (LONG)
  1446.  
  1447.            use this tag and set its data to 1  if  you  want  to  get  an
  1448.          old-style 'receive-date'. Don't use this tag or set its data  to
  1449.          zero otherwise.
  1450.  
  1451.        RMsgText, ..
  1452.        RMsgText + 127 (STRPTR*)
  1453.  
  1454.            tell UMS that you want to read the  specified  text-field  and
  1455.          supply a place for a pointer to it. This will be set to NULL  if
  1456.          the field doesn't exist or you're not allowed to read it.
  1457.  
  1458.        RTextFields (UMSMsgTextFields)
  1459.  
  1460.            if you supply a pointer to an  array  of  UMSNUMFIELDS  STRPTR
  1461.          here, it will be set to the read text-fields. Useful for reading
  1462.          a  whole  message  without  having  to  specify  a  tag for each
  1463.          possible text-field.
  1464.  
  1465.        RReadHeader (none)
  1466.  
  1467.            tell UMS that you want to read  all  header-field.  Useful  in
  1468.          combination with RTextFields only.
  1469.  
  1470.        RReadAll (none)
  1471.  
  1472.            tell UMS that you want to read the message-text,  too.  Useful
  1473.          in combination with RTextFields only.
  1474.  
  1475.          The following tag  was  not  implemented  in  ums.library  until
  1476.        V9.70!
  1477.  
  1478.        RIDStyle (LONG)
  1479.  
  1480.            choose the style of local message IDs. There are two  possible
  1481.          formats of 'local' message IDs (= the IDs created by  the  local
  1482.          system):
  1483.  
  1484.              a) a simple decimal number  that  is  unique  on  the  local
  1485.                 system
  1486.  
  1487.              b) this decimal number  followed  by  "@"  and  the  domain-
  1488.                 address  of  the  local  system.   This   conforms   with
  1489.                 RFC822/1036.
  1490.  
  1491.            Old (obsolete) Version of  ums.library  (<  V9.70)  still  use
  1492.          format a), but since V9.70 versions use format b)  in  order  to
  1493.          make  things  cleaner  and  make life easier for exporters. With
  1494.          format a)  exporters  must  append  the  domain-address  to  IDs
  1495.          themselves, with format b) they needn't care about whether an ID
  1496.          is local or not.
  1497.  
  1498.            As an interim solution this tag allows to specify the  desired
  1499.          format. Its data set to 1 forces format a), 0  (default)  forces
  1500.          format b).
  1501.  
  1502.        RNoUpdate (LONG)
  1503.  
  1504.            when reading its message-text, a message is usually updated by
  1505.          having its 'Old'-flag set in your user-status. If you don't want
  1506.          the Old-flag to be set, use this tag and set its data to 1.
  1507.  
  1508.    RESULT
  1509.        success - whether your attempt to read the message was  successful
  1510.                  or not.
  1511.  
  1512.    NOTES
  1513.          The message will be buffered, so you  can  easily  use  all  the
  1514.        returned STRPTRs. You have to use UMSFreeMsg() to free the buffers
  1515.        allocated for a certain message.
  1516.  
  1517.          The string obtained by UMSReadMsg() are private copies for you -
  1518.        though not recommended, you may even overwrite them,  but  _never_
  1519.        beyond  the  teminating  zero-byte.  UMSFreeMsg()  still  wroks if
  1520.        strings are modified.
  1521.  
  1522.          An user or exporter usually wants to read a single message  only
  1523.        once.
  1524.  
  1525.          To make this easy, UMSReadMsg() checks whether  the  user  reads
  1526.        the 'MsgText' of a message, and, if so, sets the 'Old'-Flag in the
  1527.        users status if it wasn't already set.
  1528.  
  1529.          So the user (or exporter) only needs to ask for this flag to  be
  1530.        unset when using  'UMSSearch()'  before  'UMSReadMsg()'  and  will
  1531.        automatically avoid reading the same message a second time.
  1532.  
  1533.    SEE ALSO
  1534.        UMSFreeMsg(), UMSSearch()
  1535.  
  1536. ums.library/UMSRLogin                                   ums.library/UMSRLogin
  1537.  
  1538.    NAME
  1539.        UMSRLogin -- Obtain a login for access to a message base
  1540.  
  1541.    SYNOPSIS
  1542.        login = UMSRLogin(server, user, passwd)
  1543.        D0                D2      D3    D4
  1544.  
  1545.        UMSAccount UMSRLogin(STRPTR, STRPTR, STRPTR);
  1546.  
  1547.    FUNCTION
  1548.  
  1549.          This function is used to get access to an UMS message  base.  If
  1550.        necessary the UMSServer is launched first.
  1551.  
  1552.          This function returns a handle which is used internally to track
  1553.        and remember the resources associated with each login. If an  user
  1554.        tries  to  login multiple times this handle will be different each
  1555.        time. A login may be used only by the  process  which  created  it
  1556.        UMSRLogin(). Zero on failure, any other value indicates success.
  1557.  
  1558.    INPUTS
  1559.        server - Name of the message base
  1560.        user   - Name or 'alias' of an user
  1561.        passwd - The password of the user. A pointer to the null-string is
  1562.                 allowed, NULL itself isn't.
  1563.  
  1564.    RESULT
  1565.        login  - Handle number if successful or Zero on failure
  1566.  
  1567.  
  1568.    EXAMPLE
  1569.        UMSAccount login = UMSRLogin("TestServer", "SysOp", "secret");
  1570.  
  1571.    NOTE
  1572.          Never forget to call UMSLogout()!
  1573.  
  1574.          Use this function instead of UMSLogin() for new programms.
  1575.  
  1576.    SEE ALSO
  1577.        UMSLogin(), UMSLogout()
  1578.  
  1579. ums.library/UMSSearch                                   ums.library/UMSSearch
  1580.  
  1581.    NAME
  1582.        UMSSearch -- Search a message from the MB.
  1583.  
  1584.    SYNOPSIS
  1585.        msgNum = UMSSearch( login, tags )
  1586.          D0                 D2     D3
  1587.  
  1588.        LONG UMSSearch( UMSAccount, struct TagItem * );
  1589.  
  1590.        msgNum = UMSSearchTags( login, tag1, ... )
  1591.  
  1592.        LONG UMSSearchTags( UMSAccount, ULONG, ... );
  1593.  
  1594.    FUNCTION
  1595.          Search  the  first  (or  next)  message  in  the MB that fulfils
  1596.        certain criteria.
  1597.  
  1598.          When  you  want  to  read  certain  messages  from the MB, it is
  1599.        recommended that you first select these  messages with UMSSelect()
  1600.        and  then  alternately  use  UMSSearch()  and UMSRead() to get all
  1601.        these messages.
  1602.  
  1603.    INPUTS
  1604.          Allowed tags:
  1605.  
  1606.        SearchLast (LONG)
  1607.  
  1608.            specify the last message NOT to search. This tag allows you to
  1609.          cycle trough all messages fullfilling  the  same  criteria:  set
  1610.          this  to  zero  and invoke UMSSearch() the first time. Check the
  1611.          result and if it's not zero, put  it  in  this  tag  and  invoke
  1612.          UMSSearch() again. Repeat this until it returns zero.
  1613.  
  1614.        SearchDirection (LONG)
  1615.  
  1616.            set the search direction. 1 means search  forward  (to  higher
  1617.          numbers), -1 means search backwards (to  lower  numbers)  and  0
  1618.          lets  the  MBP  decide  what  sequence  to  use. This needn't be
  1619.          exactly forwards or backwards.  It  might  be  in  a  completely
  1620.          different order.
  1621.  
  1622.            When you don't depend on a certain search-direction, use 0  or
  1623.          omit this tag.
  1624.  
  1625.        SearchGlobal (none)
  1626.        SearchLocal  (none)
  1627.        SearchUser   (STRPTR)
  1628.        SearchMask   (LONGBITS)
  1629.        SearchMatch  (LONGBITS)
  1630.  
  1631.            search   for   a   matching   status;   like    SelReadGlobal,
  1632.          SelReadLocal,   SelReadUser,   SelMask   and    SelMatch    with
  1633.          UMSSelect().
  1634.  
  1635.        WMsgText, ..
  1636.        WMsgText + 127 (STRPTR)
  1637.  
  1638.            search for a matching text; as for UMSSelect(). Only one field
  1639.          can be searched for at a time.
  1640.  
  1641.        SearchQuick (none)
  1642.  
  1643.            Enable 'quick-search'. This must be combined with exactly  one
  1644.          of WMsgText+1 .. WMsgText+31. quick-searches  are  possible  for
  1645.          exact  string  searches  only,  they  must  not be combined with
  1646.          patterns and they are only possible  for  fields  that  have  an
  1647.          index.
  1648.  
  1649.            They  don't  guarantee  that  the  returned  message's   field
  1650.          actually matches the given string,  altough  mistakes  are  very
  1651.          unlikely.
  1652.  
  1653.            But they are fast! (see NOTES below)
  1654.  
  1655.        SearchPattern (LONG)
  1656.  
  1657.            indicate whether the string to be searched  for  is  an  exact
  1658.          string (0), an AmigaDOS pattern (1) or UMS should  try  to  find
  1659.          out (2).
  1660.  
  1661.    RESULT
  1662.        msgNum - numer of a/the searched message; zero if not found.
  1663.  
  1664.    NOTES
  1665.          Although  LONGBITS  are  used  in  the  definition,  the current
  1666.        implementation only uses/supports the lower 16 bits.
  1667.  
  1668.          Performance:   when  searching  for  strings, different calls to
  1669.        UMSSearch()  may  significantly  vary  in  performance.  There are
  1670.        three general possibilities:
  1671.  
  1672.          1) quick-searches:
  1673.  
  1674.               very fast, no access to  the  hard-disk  needed  (once  the
  1675.             right index is loaded into  memory).  Only  possible  if  tag
  1676.             'SearchQuick' specified.
  1677.  
  1678.          2) indexed searches:
  1679.  
  1680.               fast, in most cases only one, short access to hd is needed;
  1681.             a few more in really bad situations. If the 'header'-file  is
  1682.             sufficiently  buffered,  no  accesses  to  the  hd may occur.
  1683.             Possible if searching for exact strings in indexed fields.
  1684.  
  1685.          3) other searches (non-indexed or patterns):
  1686.  
  1687.               slow, many data will have to be read from hd. If the  field
  1688.             searched  for  is  in  the  'header'-file  and  it's  heavily
  1689.             buffered,  no  accesses to the hd may occur. Nevertheless the
  1690.             search will consume much CPU-time.
  1691.  
  1692.          Search for status!!!
  1693.  
  1694.          Searching for a matching status only (i.e. not searching  for  a
  1695.        string) is always very fast.
  1696.  
  1697.          When doing non-indexed- or pattern-search, combine  with  status
  1698.        to reduce the amount of data to be searched through!
  1699.  
  1700.    SEE ALSO
  1701.        UMSSelect(), UMSReadMsg(), <ums.h>
  1702.  
  1703. ums.library/UMSSelect                                   ums.library/UMSSelect
  1704.  
  1705.    NAME
  1706.        UMSSelect -- Select messages.
  1707.  
  1708.    SYNOPSIS
  1709.        count = UMSSelect( login, tags )
  1710.         D0                 D2     D3
  1711.  
  1712.        LONG UMSSelect( UMSAccount, struct TagItem * );
  1713.  
  1714.        count = UMSSelectTags( login, tag1, ... )
  1715.  
  1716.        LONG UMSSelectTags( UMSAccount, ULONG, ... );
  1717.  
  1718.    FUNCTION
  1719.          Select  messages  in  the  MB according to various criteria.  To
  1720.        'select'  here means to set or unset some flags, which then can be
  1721.        used by UMSSearch(), stored, or transferred to another user.
  1722.  
  1723.          UMSSelect()  can  only  do  one operation upon every invocation.
  1724.        An  operation  usually  looks  for  all messages that fullfill the
  1725.        specified criteria and then selects them in a specified way.
  1726.  
  1727.          When  you  want  to  select  messages  by  different,  logically
  1728.        combined criteria, you may need to call UMSSelect() more than once
  1729.        and  use  some  temporary  flags.  However, very few calls to this
  1730.        functions usually should suffice.
  1731.  
  1732.    INPUTS
  1733.          The  following  tags  control  the selection of messages.  Thus,
  1734.        they somehow specify the 'output' of the select operation.
  1735.  
  1736.        SelWriteGlobal (none)
  1737.  
  1738.            manipulate global flags on the selected messages.
  1739.  
  1740.        SelWriteLocal (none)
  1741.  
  1742.            manipulate your local login-flags.
  1743.  
  1744.        SelWriteUser (STRPTR)
  1745.  
  1746.            manipulate another user's user-flags.  You  must  specify  the
  1747.          users name (or alias).
  1748.  
  1749.          SelWriteGlobal,  SelWriteLocal  and  SelWriteUser  are  mutually
  1750.        exclusive -- you can manipulate only one  flag-table  at  a  time.
  1751.        When  specifying  none  of  these  tags,  your  user-flags will be
  1752.        manipulated as default.
  1753.  
  1754.        SelSet,
  1755.        SelUnset (LONGBITS)
  1756.  
  1757.            on each selected message the 'SelUnset' flags are cleared  and
  1758.          then the 'SelSet' flags are set. ['status = (status & ~unset)  |
  1759.          set;']
  1760.  
  1761.            When writing global- or user-flags, you  are  not  allowed  to
  1762.          manipulate all possible flags. See <ums.h> for protected flags.
  1763.  
  1764.          The  following  tags control what and how messages are selected,
  1765.        the 'input' and 'modes' of the select operation.
  1766.  
  1767.        SelStart,
  1768.        SelStop (LONG)
  1769.  
  1770.            Limit the number of  messages  to  be  processed.  The  select
  1771.          operation will start with the message  indicated  by  'SelStart'
  1772.          and  stop before the 'SelStop' message. In other words, start is
  1773.          included and stop is excluded.
  1774.  
  1775.                (0 < start <= messages to be processed < stop)
  1776.  
  1777.            This was different and partly buggy in MBP versions  prior  to
  1778.          V10.16.
  1779.  
  1780.            If no 'SelStart' is specified, the operation starts  with  the
  1781.          first message; if no 'SelStop' is specified, the operation stops
  1782.          at the last existing message.
  1783.  
  1784.          The following operations are mutually exclusive:
  1785.  
  1786.      1) select by status
  1787.  
  1788.        SelReadGlobal (none)
  1789.        SelReadLocal  (none)
  1790.        SelReadUser   (STRPTR)
  1791.  
  1792.            like SelWriteGlobal, SelWriteLocal, SelWriteUser, but specifys
  1793.          which flags to look at. Again, your user-flags are the default.
  1794.  
  1795.        SelMask,
  1796.        SelMatch (LONGBITS)
  1797.  
  1798.            specify a mask and a  match.  If  (status  &  mask)  ==  match
  1799.          [status * mask = match], the message will be selected.
  1800.  
  1801.        SelParent (none)
  1802.  
  1803.            with this tag specified, each message's  'parent'  (reference;
  1804.          -> reply-chaining) will be inspected instead of its own status.
  1805.  
  1806.        SelMaxCount (LONG)
  1807.  
  1808.            this tag specifies a maximum number  of  messages  to  select.
  1809.          Even if there are more message with matching status,  only  that
  1810.          much  of them will be selected. Selects are done backwards, i.e.
  1811.          you'll get the last N matching messages.
  1812.  
  1813.        SelMaxSize (LONG)
  1814.  
  1815.            this tag specifies a maximum size for all  selected  messages.
  1816.          When selecting (from the end of the MB towards  the  beginning),
  1817.          the  selected  messages  sizes are summed up. If the sum exceeds
  1818.          the specified number bytes, the operation stops.
  1819.  
  1820.      2) select by date
  1821.  
  1822.        SelDate (LONG)
  1823.  
  1824.            the messages' dates are compared with the  supplied  date  (in
  1825.          seconds since 1.1.1978)  and  only  the  younger  ones  will  be
  1826.          selected.
  1827.  
  1828.      3) select by creation date
  1829.  
  1830.        SelCDate (LONG)
  1831.  
  1832.            the messages' creation dates are compared  with  the  supplied
  1833.          date (in seconds since 1.1.1978) and only the younger ones  will
  1834.          be selected.
  1835.  
  1836.            NOTE: binary creation date is an optional  field.  Only  those
  1837.          messages  that  have  this  field  can  be  selected  whit  this
  1838.          function!
  1839.  
  1840.      4) select a tree
  1841.  
  1842.        SelTree (LONG)
  1843.  
  1844.            you must specify the  number  of  a  message  here.  Then  all
  1845.          messages being in the same reply-tree will be selected.
  1846.  
  1847.      5) select a sub-tree
  1848.  
  1849.        SelSubTree (LONG)
  1850.  
  1851.            like SelTree, but only the subtree (the one with the specified
  1852.          message as its root) is selected.
  1853.  
  1854.      6) select a single message
  1855.  
  1856.        SelMsg (LONG)
  1857.  
  1858.            select only the specified message.
  1859.  
  1860.      7) select by text
  1861.  
  1862.        WMsgText, ..
  1863.        WMsgText + 127 (STRPTR)
  1864.  
  1865.  
  1866.            when you specify one of these tags, the function  selects  all
  1867.          messages which have the supplied string in the specified  field.
  1868.          The strings are compared case-INsensitive.
  1869.  
  1870.        SelQuick (none)
  1871.  
  1872.            when this tag is  specified,  'quick-search'  is  enabled  for
  1873.          selecting texts. This means that only some CRCs on the texts are
  1874.          compared.  This  makes  it  possible  to  select also some wrong
  1875.          messages. Yet, due to the usage of 32-bit CRCs, the  probability
  1876.          of  selecting  wrong  messages is VERY low, you most likely will
  1877.          never experience this case.
  1878.  
  1879.            As 'quick-search'  does  not  usually  need  to  access  mass-
  1880.          storage, it is VERY FAST.
  1881.  
  1882.      8) select by size
  1883.  
  1884.        SelSize (LONG)
  1885.  
  1886.            the messages' sizes are  compared  with  the  supplied  number
  1887.          (bytes) and only biggers ones will be selected.
  1888.  
  1889.    RESULT
  1890.        count - how many messages have been selected.  Zero, when no
  1891.                message has been selected or an error has occured.
  1892.  
  1893.    EXAMPLE
  1894.          See SelectMail.c for examples on how to use this function.
  1895.  
  1896.    NOTES
  1897.          Although  LONGBITS  are  used  in  the  definition,  the current
  1898.        implementation only uses/supports the lower 16 bits.
  1899.  
  1900.    SEE ALSO
  1901.        UMSSearch(), <ums.h>
  1902.  
  1903. ums.library/UMSServerControl                     ums.library/UMSServerControl
  1904.  
  1905.    NAME
  1906.  
  1907.        UMSServerControl -- control the UMS server.
  1908.  
  1909.    SYNOPSIS
  1910.  
  1911.        error = UMSServerControl(server, action)
  1912.          D0                       D2     D3
  1913.  
  1914.        UMSError UMSServerControl (STRPTR, LONG);
  1915.  
  1916.    FUNCTION
  1917.          This  function  does  not  take an UMS account as parameter, but
  1918.        simply the name of the server to address and an integer number for
  1919.        the action to the server is expected to perform. It "annonymously"
  1920.        controls the global behaviour of the server.
  1921.  
  1922.          The following actions are available:
  1923.  
  1924.        1 = CleanUp
  1925.  
  1926.            Start  the  cleanup  procedure,  reorganizing  the  whole  MB,
  1927.          physically deleting deleted and  expired  messages  and  freeing
  1928.          space  on  the HD. This procedure is critical, since the MB will
  1929.          be corrupted if the procedure is interrupted (by system failure,
  1930.          power-off,  reboot,  ..). Always make of backup of the MB before
  1931.          starting a cleanup! A cleanup is not possible if there are valid
  1932.          logins, since all message-numbers are changed.
  1933.  
  1934.        2 = Flush
  1935.  
  1936.            Flush all buffers.
  1937.  
  1938.        3 = Quit
  1939.  
  1940.            Terminate the server. If there still are  logins,  the  server
  1941.          might pop up a requester to ask whether to quit or to continue.
  1942.  
  1943.        4 = QuitForce
  1944.  
  1945.            Really terminate the server, no matter how  many  users  still
  1946.          need it. No requester.
  1947.  
  1948.        5 = Ping
  1949.  
  1950.            Test whether the addressed server is running.
  1951.  
  1952.        6 = LockCfg
  1953.  
  1954.            Globally lock the UMS configuration against changes.
  1955.  
  1956.        7 = UnlockCfg
  1957.  
  1958.            Release a lock optained with LockCfg. You should  use  LockCfg
  1959.          before and UnlockCfg after editing the file  "ums.config"  while
  1960.          the server is running.
  1961.  
  1962.    INPUTS
  1963.        server - name of the UMS server to control.
  1964.        action - number of action to perform.
  1965.  
  1966.    RESULT
  1967.        error - error number.
  1968.  
  1969.    SEE ALSO
  1970.        UMSErrTxt(), UMSErrNum()
  1971.  
  1972. ums.library/UMSWriteConfig                         ums.library/UMSWriteConfig
  1973.  
  1974.    NAME
  1975.        UMSWriteConfig -- Write an element to the UMS' configuration.
  1976.  
  1977.    SYNOPSIS
  1978.        success = UMSWriteConfig( login, tags )
  1979.          D0                       D2     D3
  1980.  
  1981.        BOOL UMSWriteConfig( UMSAccount, struct TagItem * );
  1982.  
  1983.        success = UMSWriteConfigTags( login, tag1, ... )
  1984.  
  1985.        BOOL UMSWriteConfigTags( UMSAccount, ULONG, ... );
  1986.  
  1987.  
  1988.    FUNCTION
  1989.          Create or modify elements of UMS' configuration.
  1990.  
  1991.    INPUTS
  1992.          The following tags are allowed:
  1993.  
  1994.          (Note: talking about a  'user' means  exporters  and  sysops  as
  1995.        well.)
  1996.  
  1997.        CfgData (STRPTR)
  1998.  
  1999.            this tag's data holds the  contents  of  the  variable  to  be
  2000.          written. Use this tag in conjunction with CfgName (see below).
  2001.  
  2002.        CfgUser (STRPTR)
  2003.  
  2004.            name of the user whose local configuration should be  changed.
  2005.          E.g. create a new alias or variable belonging to  the  specified
  2006.          user etc.
  2007.  
  2008.        CfgGlobalOnly (none)
  2009.  
  2010.            change an element  of  the  global  configuration  area  being
  2011.          readable by all users.
  2012.  
  2013.        CfgQuoted (LONG, V11)
  2014.  
  2015.            to store the variable's data in quoted format, allowing to mix
  2016.          the data  and  macro  definitions,  set  the  tag's  data  to  1
  2017.          otherwise set it to 0 (or do not use this tag).
  2018.  
  2019.        CfgLocal (none, V11)
  2020.  
  2021.            use this tag to create or delete variables that are only valid
  2022.          with the current login, disappearing after UMSLogout(). This way
  2023.          you  can  easily use UMSMatchConfig() without actually modifying
  2024.          the "ums.config".
  2025.  
  2026.        CfgUnlockVar (LONG, V11)
  2027.  
  2028.            use  this  tag  to  unlock  a  variable  locked   by   calling
  2029.          UMSReadConfig() with the CfgLockVar tag allowing "public" access
  2030.          again.  Set the tag's data to 1 to unlock and store the variable
  2031.          and its data, set it to 2 to just unlock  the  variable  without
  2032.          actually  saving  it  and set it to 0 (or don't use this tag) to
  2033.          not care about the current locking state of the variable.
  2034.  
  2035.  
  2036.          The following tags are mutually exclusive. Use  exactly  one  of
  2037.        them.
  2038.  
  2039.        CfgName (STRPTR)
  2040.  
  2041.            Name of the config variable to be changed. If  a  variable  of
  2042.          the given name does not exist it will be created.  To  remove  a
  2043.          variable  from  the  configuration  do not specify a tag CfgData
  2044.          (see above).
  2045.  
  2046.        CfgDump (STRPTR)
  2047.  
  2048.            write the current settings to a file with given name.
  2049.  
  2050.        CfgCreateAlias (STRPTR, V11)
  2051.  
  2052.            create a new alias of the given name for the user specified by
  2053.          the CfgUser tag (see above).
  2054.  
  2055.        CfgDeleteAlias (STRPTR, V11)
  2056.  
  2057.            remove the alias of the given name from the user specified  by
  2058.          the CfgUser tag (see above).
  2059.  
  2060.        CfgCreateExporter (STRPTR, V11)
  2061.  
  2062.            create a new export user with the given name.
  2063.  
  2064.        CfgCreateSysop (STRPTR, V11)
  2065.  
  2066.            create a new user with sysop-privilegs with the given name.
  2067.  
  2068.        CfgCreateUser (STRPTR, V11)
  2069.  
  2070.            create a new user with the given name.
  2071.  
  2072.        CfgDeleteUser (STRPTR, V11)
  2073.  
  2074.            remove the user with the given  name  from  the  configuration
  2075.          deleting her local variables as well.
  2076.  
  2077.        CfgAddNetGroup,
  2078.        CfgNetGroup (STRPTR, V11)
  2079.  
  2080.            add a netgroup entry. These two tags must  be  used  together,
  2081.          each naming one group. These two groups then are  considered  to
  2082.          the of the same "netgroup". If there are more than two named for
  2083.          the same netgroup, repeat  this  function  for  each  additional
  2084.          groupname,  setting  CfgNetGroup  to  the  name  of  an  already
  2085.          existing group.
  2086.  
  2087.        CfgDeleteNetGroup (STRPTR, V11)
  2088.  
  2089.            delete a netgroup entry. The named group will be removed  from
  2090.          the configuration.
  2091.  
  2092.  
  2093.    RESULT
  2094.        success - whether it was possible and allowed to make the desired
  2095.                  write or change.
  2096.  
  2097.    SEE ALSO
  2098.        UMSReadConfig()
  2099.  
  2100. ums.library/UMSWriteMsg                               ums.library/UMSWriteMsg
  2101.  
  2102.    NAME
  2103.        UMSWriteMsg -- write a message to the UMS message base.
  2104.  
  2105.    SYNOPSIS
  2106.        msgNum = UMSWriteMsg( login, tags )
  2107.          D0                   D3     D3
  2108.  
  2109.        LONG UMSWriteMsg( UMSAccount, struct TagItem * );
  2110.  
  2111.        msgNum = UMSWriteMsgTags( login, tag1, ... )
  2112.  
  2113.        LONG UMSWriteMsgTags( UMSAccount, ULONG, ... );
  2114.  
  2115.    FUNCTION
  2116.          Writes  a message to the UMS message base.  This may be either a
  2117.        new  message  to  create  or  an  already  existing  message to be
  2118.        changed.
  2119.  
  2120.          The  MBP  checks  correctness  of  the  message  and  the  users
  2121.        write-access  concerning  this message before writing it.  It also
  2122.        performs  dupe-checking,  tries to link to a tree of reply-chains,
  2123.        creates   all  desired  indices  and  computes  the  other  users'
  2124.        read-access to this message.
  2125.  
  2126.          All  the components of the message as well as information on how
  2127.        to do it are supplied as AmigaDOS compatible TagItems.
  2128.  
  2129.    INPUTS
  2130.          The following tags are allowed:
  2131.  
  2132.        WMsgText, ..
  2133.        WMsgText + 127 (STRPTR)
  2134.  
  2135.            specify a certain text-field.
  2136.  
  2137.            A text fields is always one null-terminated string.  Read  the
  2138.          separate documantation to see what fields and  what  formats  of
  2139.          these fields are allowed.
  2140.  
  2141.            A certain text-field (identified by its tag) may  only  appear
  2142.          once in a message. If a field is specified more than once in the
  2143.          tag list, only the latest will be used.
  2144.  
  2145.        WTextFields (UMSMsgTextFields)
  2146.  
  2147.            specify more than one text-field. This points to an  array  of
  2148.          UMSNUMFIELDS string-pointers.  All  fields  you  don't  want  to
  2149.          specify have to be NULL in this array.
  2150.  
  2151.  
  2152.        WMsgNum (LONG)
  2153.  
  2154.            when you want to change an old message, you must use this  tag
  2155.          to specify the number of the message to change. Don't  use  this
  2156.          tag when you just want to create a new message.
  2157.  
  2158.        WMsgDate (LONG)
  2159.  
  2160.            this has  a  very  special  meaning.  Specifying  an  AmigaDOS
  2161.          compatible date (seconds since 1.1.1978) with this tag indicates
  2162.          that  you  want  to  restore an old message from a backup rather
  2163.          than writing a new one. All users will have the 'old'  flag  set
  2164.          and not get this message as a new one when this tag is used.
  2165.  
  2166.        WChainUp (LONG)
  2167.  
  2168.            in some cases it might be unsure or impossible for the MBP  to
  2169.          build the correct reply-chain for a message.  Use  this  tag  to
  2170.          specify the number of the old message that is referred to by the
  2171.          new one.
  2172.  
  2173.        WHardLink,
  2174.        WSoftLink (LONG)
  2175.  
  2176.            Writing a message with a Message-ID that already exists in the
  2177.          MB usually will lead to the detection of a 'dupe'. Yet  in  some
  2178.          cases  it  is  necessary for UMS to allow multiple messages with
  2179.          the same Message-ID.
  2180.  
  2181.            This is made possible by the concept of message-'links'.  With
  2182.          this concept, multiple messages sharing the same Message-ID (and
  2183.          perhaps  some  more  fields)  are organized in a circular linked
  2184.          list. To create such a linked list, you  just  write  its  first
  2185.          message  as  usual  and  remember its number. Then you write the
  2186.          other messages using one of the above tags to specify the number
  2187.          of the original message (or any of the already linked messages).
  2188.  
  2189.            The MBP may optimize storage space for message links  by  only
  2190.          storing the fields  that  differ  between  the  fields  and  the
  2191.          original  message.  Nevertheless  you always have to specify the
  2192.          whole message to write a  link  and  you  will  always  get  the
  2193.          complete message when reading a link.
  2194.  
  2195.            All links to a message must consist of the same fields as  the
  2196.          original message, but the contents of the fields may differ.
  2197.  
  2198.            There are two sorts of message-links, hardlinks and softlinks.
  2199.          Softlinks describe messages that have some fields in common  (at
  2200.          least  MsgID),  but  are  really treated as individual messages.
  2201.          E.g. a mail with multiple receipients. Hardlinks, on  the  other
  2202.          hand,  are treated as one message wherever possible. I.e. if you
  2203.          read one hardlinked message, all the other links will be  marked
  2204.          as  old,  too.  RFC  crosspostings, for instance, should be made
  2205.          hardlinks.
  2206.  
  2207.        WAutoBounce (LONG)
  2208.  
  2209.            If the msg to be written is addressed to  a  local  user  that
  2210.          doesn't exist or to an address  that  no  exporter  can  export,
  2211.          there are two possible behaviours possible for the MBP:
  2212.  
  2213.            a) reject the message using error-no "NoReader", expecting the
  2214.               client to care about the undeliverable message
  2215.  
  2216.            b) keep the message, forwarding it to the local sysop or  some
  2217.               kind of 'bounce-daemon', so that the writing  client  needs
  2218.               not to care about the message any more.
  2219.  
  2220.            This tag allowes to  specify  the  desired  behaviour,  data=0
  2221.          forces a), data=1 forces b). If this tag is not  specified,  the
  2222.          MBP  will  choose the behaviour as it wishes, maybe depending on
  2223.          whether the writing user is an exporter or not.
  2224.  
  2225.        WHide (LONG)
  2226.  
  2227.            In some cases it might be desirable to write  a  message  that
  2228.          can only by read by exporters and not by simple  users,  or  the
  2229.          other way round.
  2230.  
  2231.            For instance control-messages that are of no interest to users
  2232.          by must be distributed over the net.
  2233.  
  2234.            Setting data to 0 is the same as  the  default.  data=1  means
  2235.          that only exporters may view and read the message, data=2  makes
  2236.          the message invisible to exporters and only accessible to simple
  2237.          users.
  2238.  
  2239.        WHdrFill,
  2240.        WTxtFill (LONG)
  2241.  
  2242.            specify how many bytes to reserve for  later  changes  in  the
  2243.          header/text of the message.
  2244.  
  2245.            The MBP may not be able to change an existing message  if  the
  2246.          change would increase the overall size (maybe after compression)
  2247.          of  the  message.  Since  such  changes  are  neccessary in some
  2248.          special cases, the MBP can be told to reserve  some  space  when
  2249.          writing a message the first time.
  2250.  
  2251.            Reserving more than actually needed is not a good idea,  since
  2252.          it decreases performance and  wastes  space.  The  writer  of  a
  2253.          message  usually  should  know whether or not he will change the
  2254.          message later on and to what extend he will increase the size of
  2255.          the message.
  2256.  
  2257.        WNoUpdate (LONG)
  2258.  
  2259.            when writing a message, the 'Old'-flag in your user-status for
  2260.          the new message will usually be set. If you don't want this, use
  2261.          this tag and set its data to 1.
  2262.  
  2263.        WCheckHeader (LONG)
  2264.  
  2265.            if you just want to check whether the MBP would likely  accept
  2266.          a message but you don't  yet  have  the  complete  body  of  the
  2267.          message,  you can use this tag und set its data to 1: nothing is
  2268.          actually written to the MB. If the supplied message-header seems
  2269.          to  be  ok, -1 will be returned as a "fake" message number. Then
  2270.          you can get the messages body (e.g. transfer it over a  network)
  2271.          and write the message with removing this tag of just setting its
  2272.          data to 0.
  2273.  
  2274.    RESULT
  2275.        msgNum - Number of the written message or NULL on failure.
  2276.  
  2277.    NOTES
  2278.          Changing an old message:
  2279.  
  2280.          You must _always_ give a complete message to UMSWriteMsg(), even
  2281.        when changing an old one! The MBP needs this to detect all changes
  2282.        made  to  the  old  message,  including  changed, added or deleted
  2283.        fields. Thus you need to read a message prior to changing it.  Use
  2284.        RTextFields and WTextField for UMSReadMsg() and UMSWriteMsg() when
  2285.        changing an old message! Otherwise you will lose fields unknown to
  2286.        your   application   that   might  be  still  important  to  other
  2287.        applications!
  2288.  
  2289.          You may not be allowed to change certain fields of  an  existing
  2290.        message. Most likely those fields that are  used  by  the  MBP  to
  2291.        compute all the users access-rights will be prohibited to change.
  2292.  
  2293.